<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@page import="java.util.Date"%>
<%@page import="java.text.SimpleDateFormat"%>
<%@page import="com.sun.corba.se.impl.javax.rmi.CORBA.Util"%>
<%@page import="com.sun.xml.internal.bind.v2.schemagen.xmlschema.Import"%>
<%@ include file="/WEB-INF/jsp/include.jsp"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<c:set var="webctx" value="${pageContext.request.contextPath}" />
<!DOCTYPE html>
<html>
<head>
	<title>嘟嘟私人订制花卉网</title>
	<meta name="keywords" content="嘟嘟私人订制花卉网">
	<meta name="description" content="嘟嘟私人订制花卉网">
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
	<link rel="shortcut icon" href="resources/images/favicon.ico">
	
	<!-- include main css -->
	<link rel="stylesheet" type="text/css" href="${webctx}/resources/css/slick.css"/>	
	<link rel="stylesheet" type="text/css" href="${webctx}/resources/css/bootstrap.css"/>
	<link rel="stylesheet" type="text/css" href="${webctx}/resources/css/jquery.mmenu.all.css"/>
	<link rel="stylesheet" type="text/css" href="${webctx}/resources/css/style.css"/>
	<link rel="stylesheet" type="text/css" href="${webctx}/resources/css/jquery.mCustomScrollbar.css"/>
	
    
    <style>
    #makegroup{
    margin-left:400px;
	padding:10px;
	font-size:20px;
	background-color:#D6B870;
	color:white;
	}
	#makegroup:hover{
		margin-lef:400px;
		padding-top:10px;
		font-size:20px;
		background-color:#CAA752;
		color:white;
	}
		
		#totalprice input{
		border:none;
		text-align:center;
		}
		table {
	/* border-collapse: collapse; */
	/* text-align: left; */
	margin-left:-20px auto;
	float: none;
	font-family:Microsoft YaHei;
	font-size:15pt;
	color:black !important;	
	}
	table tr td {
		padding:5px;
		border:1.5px solid #c9daf8;
		margin:0.5px;
	}
	#uldetail{
		font-size:15pt;
		font-family:Microsoft YaHei;
		color:black !important;
	}
	#uldetail li{
		padding-top:10px;
	}
	</style>
	<script type="text/javascript">	
    <%
    SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
	SimpleDateFormat number = new SimpleDateFormat("yyyyMMddHHmmss");
	%>
	<%
	SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss ");
	String date= format.format(new Date());
	%>
	
	function addPrivate(){
		$('#privateForm').attr('action', "addprivate");
		$('#privateForm').submit();
	}
	</script>
</head>
<body>
	
<div>
	<!--header-->
	<header class="header">
		<section class="container naver clearfix">
			<div class="logo pull-left"><a href="index.html" title="嘟嘟私人订制花卉网">Du Du</a></div>
			<nav class="nav pull-left">
				<ul>
					<li class="active"><a href="first">首页</a></li>
					<li><a href="product.html">私人定制</a>
						<ul>
							<li><a href="showflower">私人定制</a></li>
							<li><a href="showprivateorder">定制订单</a></li>
						</ul>
					</li>
					<li><a href="case.html">我的订单</a>
						<ul>
							<li><a href="showorder?username=<%=((jp.co.lkg.springsmp.common.db.dto.UserinfoDto)request.getSession().getAttribute("sessionUser")).getUsername()%>">查看订单</a></li>
							<li><a href="#">新增分类</a></li>
						</ul>
					</li>
					<li><a href="contact.html">联系我们</a>
						<ul>
							
							<li><a href="message.html">在线留言</a></li>
							
						</ul>
					</li>
				</ul>
			</nav>
				<div class="search pull-left">
				<img src="${webctx}/resources/images/search.png"/>
				<input type="text" class="top_search"   value="" />
				<input type="submit" class="top_sub" value="搜索" />
			</div>
			<div class="language pull-right clearfix">
				<div class="language_wrap">
					<a href="#">EN</a>
					<a href="#">CN</a>
				</div>
				
				<span > <%=((jp.co.lkg.springsmp.common.db.dto.UserinfoDto)request.getSession().getAttribute("sessionUser")).getUsername()%></span>
				
			</div>
		</section> 			
	</header>
</div>

<!--内页内容区域-->
<div class="container ny-wrap">
	<div class="pro-title clearfix">
		<span class="pull-left">订制中心</span>
		<p class="pull-right">
		</p>|
	</div>
	<div class="container love-wrap pro-con">
		<ul class="clearfix" id="goodInfo" path="goodInfo" multiple="true">	
			<c:forEach var="item" items="${userinfoForm.flowerlist}" varStatus="status">
			<li>			
				<div class="pic"><a href="javascript:;"><img src="${webctx}/resources/upload/flower/${item.flowerImage }" class="vcenter" /><input type="hidden" id="flowerId${status.index+1}" value="${item.flowerId }"/></a></div>
				<p><a href="javascript:;">${item.flowerName }<input type="hidden" id="flowerid${status.index+1 }" value="${item.flowerId}"/><input type="hidden" id="flowername${status.index+1 }" value="${item.flowerName }"/></a><em>¥</em> <span>${item.flowerPrice}</span>/支</p>	
				<div class="txt" id="fnum">
					<span id="">输入数量：<input type="text" id="flowernum${status.index+1 }" value="0" size="3" onchange="makeflowernum()"/><input type="hidden" id="flowerprice${status.index+1}" value="${item.flowerPrice}"/></span>
					<span id="">(库存：${item.flowerStock })<input type="hidden" id="maxnum${status.index+1}" value="${item.flowerStock }"/>
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;合计：<input type="text" id="totalprice${status.index+1 }" value="0" size="3" disabled="disabled"/>元</span>
				</div>		
			</li>
			<c:if test="${status.last}">
			<input type="hidden" value="${status.index+1}" id="flowercount">
			</c:if>
			</c:forEach>
		</ul>
	</div>
</div>

<!--订制详情-->
<form id="privateForm" method="post"  name="userinfoForm">
	<div class="container xgcp love-wrap">
		<div class="xgcp-title">
			<h3>订制详情</h3>
			<p>We hope that through the flower box of love, affection and friendship express intuitive, needless to say, everything is in the middle of the flower box. </p>
		</div>
		<ul class="clearfix xgcp-con" id="uldetail">
			<li>名称：<input type="text" name="privateinsertDto.privateName"/>
				<input type="hidden" name="privateinsertDto.privateId" id="orderid" value="<%=number.format(new Date()) %>"/>
				<input type="hidden" name="privateinsertDto.privateOwner" value="<%=((jp.co.lkg.springsmp.common.db.dto.UserinfoDto)request.getSession().getAttribute("sessionUser")).getUsername()%>"/>
				<input type="hidden" name="privateinsertDto.privateTime"  value="<%=date%>"/>
				<input type="hidden" name="privateinsertDto.privateStatus" value="正常"/>
				<input type="hidden" name="privateinsertDto.privatePaystatus" value="未支付"/>
				<input type="hidden" id="privateDetails" name="privateinsertDto.privateDetails" value=""/>
			</li>
			<li style="vertical-align:center">花语：<textarea name="privateinsertDto.privateIntroduction"></textarea></li>
			<li>私人订制合计：<input type="text" id="grouptotalPrice" name="privateinsertDto.privateCost" value="0" size="3" readonly="true"/>元</li>
		</ul>
		<table id="showchoose">
			<tr>
				<td style="text-align:center">所含花种</td>
				<td style="text-align:center">价格</td>
			</tr>
			<tr>
			
			<td style="text-align:center" id="totalnum" >无</td>
			<td style="text-align:center"  id="tprice">无</td>
			</tr>
		</table><br>
		<div class="txt" id="faction">
			<input type="button" onclick="sum();addPrivate()" value="购买">				
		</div>	
	</div>
</form>
	
<!--底部导航-->
<div class="container footer-nav">
	<div class="panel-footer clearfix">
		<div class="footer-left pull-left">
			<ul>
				<li><a href="javascript:;">首页</a></li>
				<li><a href="javascript:;">私人订制</a></li>
				<li><a href="javascript:;">产品中心</a></li>
				<li><a href="javascript:;">联系我们</a></li>
				<li><a href="javascript:;">站点地图</a></li>
			</ul>
		</div>
		<div class="footer-right pull-right">
			<div class="friend">
				友情链接
				<img class="pull-right" src="images/friends-bg.png" alt="" />
			</div>
			<div class="dropdown">
				<a href="http://www.baidu.com" target="_blank">百度1下，你就知道</a>
				<a href="http://www.baidu.com" target="_blank">百度2下，你就知道</a>
				<a href="http://www.baidu.com" target="_blank">百度3下，你就知道</a>
				<a href="http://www.baidu.com" target="_blank">百度4下，你就知道</a>
			</div>
		</div>
	</div>
	<div class="footer-copy">
		<div class="erweima-wrap"><img src="resources/images/erweima.jpg" alt="" /></div>
		<div class="footer-hotline">
			<img src="resources/images/yu.png" alt="" />
			<span>服务热线：<b>17772285375</b><em>版权所有<i>©</i>：嘟嘟私人花卉网  沪ICP备09078302号-203</em></span>
		</div>
	</div>
</div>


<!--Include Js-->
<script src="http://apps.bdimg.com/libs/jquery/1.8.3/jquery.min.js" type="text/javascript" charset="utf-8"></script>

<!--移动端导航-->
<spring:url value="/resources/js/jquery.mmenu.all.min.js" var="jquery" />
<script src="${jquery}"></script>

<spring:url value="/resources/js/public.js" var="puJs" />
<script src="${puJs}"></script>

<spring:url value="/resources/js/slick.min.js" var="jquery" />
<script src="${jquery}"></script>

<spring:url value="/resources/js/privateflower.js" var="privateflower" />
<script src="${privateflower}"></script>

<!--placeholder-->
<spring:url value="/resources/js/jquery.placeholder.min.js" var="jquery" />
<script src="${jquery}"></script>
<script type="text/javascript">
	$(function(){ $('input, textarea').placeholder(); });
	
</script>

</body>
</html>
